#pragma once

template< class ObjectType>
class TSharedPtr
{
public:
	friend class TSharedPtr;

	TSharedPtr() : Object(nullptr) {}
	TSharedPtr(ObjectType* obj) : Object(obj) {}

	template <typename OtherType>
	FORCEINLINE TSharedPtr(TSharedPtr< OtherType > const& InSharedPtr)
		: Object(InSharedPtr.Object)
	{ }

	FORCEINLINE ObjectType* operator->() const
	{
		return Object;
	}

private:

	ObjectType* Object;

};

template< class ObjectType>
class TSharedRef
{
public:

	FORCEINLINE ObjectType* operator->() const
	{
		// Should never be nullptr as TSharedRef is never nullable
		checkSlow(IsValid());
		return Object;
	}

private:

	ObjectType* Object;
};